#include <QDebug>

#include "message.h"

Message::Message(QObject *parent) : QObject(parent)
{

}

const QString &Message::author()
{
    return m_author;
}

void Message::setAuthor(const QString &author)
{
    if (!m_author.compare(author)) {
        return;
    }
    m_author = author;
    emit authorChanged();
    qDebug() << Q_FUNC_INFO;
}

const QDateTime &Message::creationDate()
{
    return m_creationDate;
}

void Message::setCreationDate(const QDateTime &creationDate)
{
    if (m_creationDate == creationDate) {
        return;
    }
    m_creationDate = creationDate;
    emit creationDateChanged();
    qDebug() << Q_FUNC_INFO;
}
